import java.util.List;

public class Test {
    public static void main(String[] args) {
        BinaryTree binaryTree=new BinaryTree();
        BinaryTree.TreeNode root=binaryTree.createTree();
        binaryTree.preOrder(root);
        System.out.println();
        binaryTree.inOrder(root);
        System.out.println();
        binaryTree.postOrder(root);

        System.out.println();

        List<BinaryTree.TreeNode> ret=binaryTree.preOrder2(root);
        for (BinaryTree.TreeNode x:ret) {
            System.out.print(x.val+" ");
        }
        System.out.println();

        System.out.println(binaryTree.sizeNode(root));
        System.out.println(binaryTree.sizeNode2(root));

        System.out.println(binaryTree.getLeafNodeCount(root));
        System.out.println(binaryTree.getLeafNodeCount2(root));

        System.out.println(binaryTree.getHeight(root));
        System.out.println(binaryTree.getHeight2(root));

        System.out.println(binaryTree.find(root, 'E'));

        binaryTree.levelOrder(root);
        System.out.println();

        System.out.println(binaryTree.isCompleteTree(root));
    }
}
